<?php


namespace common\validate;


class ReviewTask extends BaseValidate
{
    public $rule = [];

    // WaitAssembleList 验证场景定义
    public function sceneWaitAssembleList()
    {
        return $this->append('module_code', 'require')
            ->append('param.filter', 'require');
    }

    // AssemblePlayList 验证场景定义
    public function sceneAssemblePlayList()
    {
        return $this->append('data.name', 'require')
            ->append('data.entity_ids', 'require|array')
            ->append('data.module_code', 'require|max:40');
    }

    // AssembledList 验证场景定义
    public function sceneAssembledList()
    {
        return $this->append('param.filter', 'require')
            ->append('param.filter.project_id', 'require')
            ->append('param.filter.step_category_id', 'require')
            ->append('param.filter.initial_episode_code', 'require')
            ->append('param.filter.step_id', 'require')
            ->append('param.order', 'require');
    }

    // SubmitReview 验证场景定义
    public function sceneSubmitReview()
    {
        return $this
            ->append('data.task_version_review_data', 'require|array')
            ->append('data.name', 'require')
            ->append('data.plan_end_time', 'require|date')
            ->append('data.step_category_id', 'require|integer')
            ->append('data.project_id', 'require|integer')
            ->append('data.module_code', 'require');
    }

    // WaitReviewPlayListVersion 验证场景定义
    public function sceneWaitReviewPlayListVersion()
    {
        return $this->append('param.filter', 'require')
            ->append('param.order', 'require');
    }

    // SelectPlayListTaskVersionInfo 验证场景定义
    public function sceneSelectPlayListTaskVersionInfo()
    {
        return $this->append('param.task_versions', 'require|array');
    }

    // SelectPlayListTaskVersionInfoVersions 验证场景定义
    public function sceneSelectPlayListTaskVersionInfoVersions()
    {
        return $this
            ->append('task_id', 'require|integer')
            ->append('version_id', 'integer')
            ->append('review_request_id', 'integer')
            ->append('review_request_node_id', 'integer');
    }

    // ReviewAllByPlaylistVersion 验证场景定义
    public function sceneReviewAllByPlaylistVersion()
    {
        return $this->append('param.filter.playlist_version_id', 'require|integer')
            ->append('param.is_pass', 'require|in:yes,no');
    }

    // GetCompareDataSource 验证场景定义
    public function sceneGetCompareDataSource()
    {
        return $this->append('param.filter.id', 'require|integer');
    }

    public function sceneGetTaskSubmitReview()
    {
        return $this->append('param', 'require')
            ->append('param.filter', 'require')
            ->append('param.filter.project_id', 'integer')
            ->append('param.filter.clock_time', 'integer');
    }

    public function sceneGetAssetSubmittedReviewPlaylistItem()
    {
        return $this->append('param', 'require')
            ->append('param.filter', 'require')
            ->append('param.filter.step_category_id', 'require')
            ->append('param.filter.playlist_version_id', 'require|integer');
    }

    public function sceneGetDeferredTaskSelect()
    {
        return $this->append('param', 'require')
            ->append('param.filter', 'require|array')
            ->append('param.filter.project_id', 'require')
//            ->append('param.filter.step_category_id', 'require')
            ->append('param.page', 'array');
    }

    public function sceneGetIncompleteReviewTask()
    {
        return $this->append('param', 'require')
            ->append('param.filter', 'require|array')
            ->append('param.filter.project_id', 'require')
//            ->append('param.filter.step_category_id', 'require')
            ->append('param.page', 'array');
    }

    public function sceneAcceptFeedback()
    {
        return $this->append('param', 'require')
            ->append('param.filter', 'require|array')
            ->append('param.filter.id', 'require')
            ->append('param.filter.review_request_node_id', 'require');
    }

    public function sceneFixReviewRequestNodeNotReviewList()
    {
        return $this->append('param', 'require')
            ->append('param.filter', 'require')
            ->append('param.filter.user_name', 'require');
    }

    public function sceneGetVersionCheckListTree()
    {
        return $this->append('param', 'require')
            ->append('param.filter', 'require')
            ->append('param.filter.version_id', 'require|integer');
    }

    // GetAssetSubmittedReviewTask 验证场景定义
    public function sceneGetAssetSubmittedReviewTask()
    {
        return $this->append('param', 'require|array');
    }

    // GetTaskReviewSchedule 验证场景定义
    public function sceneGetTaskReviewSchedule()
    {
        return $this->append('data.task_version_review_data', 'require|array');
    }

    // QueryReviewTaskVersionCheckList 验证场景定义
    public function sceneQueryReviewTaskVersionCheckList()
    {
        return $this->append('param', 'require')
            ->append('param.review_request_id', 'require|integer')
            ->append('param.review_request_node_id', 'require|integer');
    }
	// GetTaskSubmitReviewStepCategoryCount 验证场景定义
    public function sceneGetTaskSubmitReviewStepCategoryCount()
    {
        return $this->append('param', 'require')
            ->append('param.filter', 'require')
            ->append('param.filter.module_code', 'require|in:asset,shot,sequence')
            ->append('param.filter.project_id', 'require|integer')
            ->append('param.filter.deal_status', 'require');
    }

	// ReviewTaskListCount 统计审核镜头-资产验证场景定义
	public function sceneReviewTaskListCount()
	{
		return $this->append('param', 'array');
	}
}
